package com.xu.sms.entity;

import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author Administrator
 *
 */
public class Type implements Serializable {
	
	private Integer typeId;
    private String typeName;
    private Date typeTime;
    private String typeImgurl;
    private Integer typeParentid;
    private String typeDescription;
    
    private Integer localImgId;
    
     public static final int FESTIVAVL_ID = 1; //节日id
	 public static final int BENSION_ID = 2; //祝福id
	 public static final int OTHER_ID = 3; //其他id
	 public static final int HOT_ID = 4;//首页

    public Type() {
        super();
    }

    public Type( Integer typeId,String typeName, Date typeTime, Integer localImgId) {
    	this.typeId = typeId;
        this.typeName = typeName;
        this.typeTime = typeTime;
        this.localImgId = localImgId;
    }
    
    public Type( Integer typeId,String typeName, Date typeTime, Integer localImgId,
    		String typeDescription) {
    	this.typeId = typeId;
        this.typeName = typeName;
        this.typeTime = typeTime;
        this.localImgId = localImgId;
        this.typeDescription = typeDescription;
    }
    
    

    public Integer getLocalImgId() {
		return localImgId;
	}

	public void setLocalImgId(Integer localImgId) {
		this.localImgId = localImgId;
	}

	public Integer getTypeId() {
        return typeId;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public Date getTypeTime() {
    	
        return typeTime;
    }
    
    public String getTypeDescription() {
		return typeDescription;
	}

	public void setTypeDescription(String typeDescription) {
		this.typeDescription = typeDescription;
	}

	public String getTypeTimeStr(){
    	SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy.MM.dd");
    	String strTypeTime = "";
    	if(typeTime !=null){
    		 strTypeTime = simpleDateFormat.format(typeTime);
    	}
		
		return strTypeTime;
    }
    public void setTypeTime(Date typeTime) {
        this.typeTime = typeTime;
    }

    public String getTypeImgurl() {
        return typeImgurl;
    }

    public void setTypeImgurl(String typeImgurl) {
        this.typeImgurl = typeImgurl;
    }

    public Integer getTypeParentid() {
        return typeParentid;
    }

    public void setTypeParentid(Integer typeParentid) {
        this.typeParentid = typeParentid;
    }

	@Override
	public String toString() {
		return "Type [typeId=" + typeId + ", typeName=" + typeName
				+ ", typeTime=" + typeTime + ", typeImgurl=" + typeImgurl
				+ ", typeParentid=" + typeParentid + "]";
	}

   

}
